<?php
$tablelist = $this->tablelist;
$search = $this->search; //搜索用的条件数组
include 'include_pagerform.php';
?>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?= $this->action ?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>名称查找：</td>
                    <td><input type="text" name="search[menuitem.name]" value="<?= str($search['menuitem.name']) ?>" /></td>
                    <td>所属应用模块：</td>
                    <td>
                        <select class="combox required" name="search[appmodule]">
                            <option value="">显示所有应用模块</option>
                        </select>
                    </td>
                    <td>
                        <div class="subBar">
                            <ul>
                                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                                <li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>

        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="?c=sys_menuitem&a=info&id=0" target="dialog" rel="sys_menuitem_add"><span>添加</span></a></li>
            <!--<li><a class="delete" href="demo/common/ajaxDone.html?uid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>-->
            <li><a class="edit" href="?c=sys_menuitem&a=info&id={sid_user}" target="dialog" rel="sys_menuitem_info"><span>修改</span></a></li>
            <li><a class="delete" href="?c=sys_menuitem&a=del" target="selectedTodo" rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
            <!--
            <li class="line">line</li>
            <li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
            -->
        </ul>
    </div>
    <table class="table" width="100%" layoutH="116">
        <thead>
            <tr align="center">
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th<?= $this->orderField("menuitem.id") ?>>ID</th>
                <th<?= $this->orderField("menuitem.name") ?>>英文名称</th>
                <th<?= $this->orderField("menuitem.title") ?>>中文名称</th>
                <th<?= $this->orderField("classname") ?>>所属路径</th>
                <th<?= $this->orderField("status") ?>>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <? foreach ($tablelist as $row) { ?>
                <tr target="sid_user" rel="<?= $row['id'] ?>" align="center">
                    <td><input name="ids" type="checkbox"></td>
                    <td><?= $row['id'] ?></td>
                    <td><?= $row['name'] ?></td>
                    <td><?= $row['title'] ?></td>
                    <td><?= $row['parentdir'] ?>_<?= $row['classname'] ?></td>
                    <?
                    if ($row['enable'] && $row['visible']) {
                        echo '<td style="color:green">正常显示</td>';
                    } else if (!$row['enable']) {
                        echo '<td style="color:#AAAAAA">已禁用</td>';
                    } else {
                        echo '<td style="color:red">已隐藏</td>';
                    }
                    ?>
                    <td>
                        <a target="ajaxTodo" href="?c=sys_menuitem&a=del&id=<?= $row['id'] ?>" class="btnDel" title="确定要删除吗?">删除</a>
                        <a href="?c=sys_menuitem&a=info&id=<?= $row['id'] ?>" class="btnEdit" rel="sys_menuitem_info" target="dialog" width="530" height="350">菜单编辑</a>
                        <a href="?c=sys_procedure&a=list&search[procedure.menuitemid]=<?= $row['id'] ?>&search[procedure.parentid]=0&search[procedure.viewnameid]=0" class="btnInfo" rel="sys_procedure_list_0" target="navTab" width="700" height="400">控制层代码-<?= $row['title'] ?></a>
                        <?php /*
                          foreach ($this->tables['procgroup'] as $gp) {
                          ?>
                          <a href="?c=sys_procedure&a=list&menuitemid=<?= $row['id'] ?>&parentid=<?= $gp['name'] ?>" class="<?= $gp['class'] ?>" rel="sys_procedure_list_<?= $gp['name'] ?>" !target="dialog" target="navTab" width="700" height="400"><?= $gp['title'] ?></a>
                          <?
                          } */
                        ?>
                    </td>
                </tr>
            <? } ?>
        </tbody>
    </table>
    <?php
    include 'include_pagesbar.php';
    ?>
</div>
